package cz.fimuni.pa165.frontend.restservice;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *
 * @author Lukáš Slovák
 */
public interface CompanyRestServiceInterface {
    
    @RequestMapping(value = "/add", method = RequestMethod.POST, headers = "Content-Type=application/json")
    @ResponseBody
    ResponseEntity<String> addCompany(@RequestBody String json);

    @RequestMapping(value = "/delete/{id}", method = RequestMethod.DELETE)
    @ResponseBody
    ResponseEntity<String> deleteCompany(@PathVariable Long id);

    @RequestMapping(value = "/all", method = RequestMethod.GET)
    @ResponseBody
    ResponseEntity<String> companyHome();

    @RequestMapping(value = "/get/{id}", method = RequestMethod.GET)
    @ResponseBody
    ResponseEntity<String> companyGet(@PathVariable(value = "id") Long id);

    @RequestMapping(value = "/edit", method = RequestMethod.POST, headers = "Content-Type=application/json")
    @ResponseBody
    ResponseEntity<String> companyEdit(@RequestBody String json);
    
}
